﻿using Cofe.Core.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Filter
{
    public static class IEntryFilterGeneratorExtension
    {
        public static Guid GetId(this IEntryFilterGenerator gen, ICofeSystemInfo entry)
        {
            return
                StringUtils<IFilter>.GetDeterministicGuid(
                CofeServices.EntryFilterParser.FilterToFilterString(
                gen.GenerateFilters(entry)));
        }
    }
}
